<?php
/**
*
*===================================================================
*
*  phpBB Code Repository -- Installer File
*-------------------------------------------------------------------
*	Script info:
* Version:		2.0.0 - "Xerxes" - Alpha 1
* SVN ID:		$Id: install_main.php 3 2009-07-31 02:25:51Z sTraTosphere.programming $
* Copyright:	(c) 2008, 2009 | Obsidian
* Copyright:	(c) 2008, 2009 | Deadpool (original author) -- http://the-webmasters-resource.info
* License:		http://opensource.org/licenses/gpl-2.0.php | GNU Public License v2
* Package:		Install
*
*===================================================================
*
*/

/**
 * @ignore
 */
if (!defined('IN_INSTALL'))
{
	// Someone has tried to access the file direct. This is not a good idea, so exit
	exit;
}

if (!empty($setmodules))
{
	$module[] = array(
		'module_type'		=> 'install',
		'module_title'		=> 'OVERVIEW',
		'module_filename'	=> substr(basename(__FILE__), 0, -strlen(PHP_EXT)-1),
		'module_order'		=> 0,
		'module_subs'		=> array('INTRO', 'LICENSE', 'SUPPORT'),
		'module_stages'		=> '',
		'module_reqs'		=> ''
	);
}

/**
* Main Tab - Installation
* @package install
*/
class install_main extends module
{
	public function __construct(&$p_master)
	{
		$this->p_master = &$p_master;
	}

	public function main($mode, $sub)
	{
		global $user, $template;

		switch ($sub)
		{
			case 'intro':
				$this->page_title = $user->lang['SUB_INTRO'];
				$body = $user->lang['OVERVIEW_BODY'];
				$this->tpl_name = 'install_body';
			break;

			case 'license':
				$this->page_title = $user->lang['GPL'];
				$body = str_replace("\n", '<br />', htmlspecialchars(file_get_contents(PHPBB_ROOT_PATH . 'install_crs/license.txt')));
				$this->tpl_name = 'install_body';
			break;

			case 'support':
				$this->page_title = $user->lang['SUB_SUPPORT'];
				$body = $user->lang['SUPPORT_BODY'];
				$this->tpl_name = 'install_body';
			break;
		}

		$template->assign_vars(array(
			'TITLE'		=> $this->page_title,
			'BODY'		=> $body,
			'S_LANG_SELECT'	=> false,
		));
	}
}

?>